package com.physics.mps.module.comsol.service;

import com.physics.mps.module.comsol.vo.ComsolSolveVo;
import com.physics.mps.module.comsol.vo.ComsolVo;

/**
 * @author mcsoft
 * @date 2023/10/16 16:17
 * @description comsol service
 */
public interface ComsolService {


    String EXEC_CMD_FORMAT = "%s/start.bat %s %s";

    String COMSOL_COMPILE_ERROR = "COMSOLCOMPILEERROR";

    String COMSOL_ERROR = "COMSOLERROR";

    String COMSOL_SUCCESS = "COMSOLSUCCESS";

    String RESULT_FILE_PATH_FORMAT = "%s/result/%s.vtu";

    String RESULT_IMG_FILE_PATH_FORMAT = "%s/img/%s.png";

    String LOG_FILE_PATH_FORMAT = "%s/logs/%s.log";

    String JAVA_FILE_PATH_FORMAT = "%s/java/%s.java";

    String RESULT_VOLUME_PATH_FORMAT = "%s/result/volume/%s.%s";

    String SPLIT = "_";

    String RandomVibration = "6";

    String HeatTransferInSolids = "7";

    String ThermalStructureInteraction = "8";

    String HeatTransferInSolidsAndFluids = "9";




    /**
     * 提交
     * @param comsolSolveVo
     */
    void submit(ComsolSolveVo comsolSolveVo);


    /**
     * 提交
     * @param comsolVo
     */
    void submit(ComsolVo comsolVo);


    /**
     * 生成 comsol java 脚本文件
     * @param comsolVo
     */
    void genJavaFile(ComsolSolveVo comsolVo);


    /**
     * 求解 编译 & 运行
     * 1、comsol 编译
     * 2、comsol 运行
     * @param clasName
     * @return      错误信息
     */
    String solution(String clasName) ;


    /**
     * 获取结果的路径
     * @param subTaskId
     * @param type
     * @return
     */
    String getResult(String subTaskId, String type);




}
